From ec0c739520239049265c577d67b10eed57dde194 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Fri, 22 Oct 2010 22:32:10 +0200 Subject: [PATCH] gtktreemodelfilter: Move documentation to inline comments --- docs/reference/gtk/tmpl/.gitignore | 1 + .../gtk/tmpl/gtktreemodelfilter.sgml | 198 ------------------ gtk/gtktreemodelfilter.c | 31 +++ gtk/gtktreemodelfilter.h | 29 +++ 4 files changed, 61 insertions(+), 198 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtktreemodelfilter.sgml diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore index 27b8d692bf..b1a29e63ae 100644 --- a/docs/reference/gtk/tmpl/.gitignore +++ b/docs/reference/gtk/tmpl/.gitignore @@ -50,6 +50,7 @@ gtktoolbar.sgml gtktoolitem.sgml gtktooltip.sgml gtktreednd.sgml +gtktreemodelfilter.sgml gtktreeselection.sgml gtktreesortable.sgml gtktreestore.sgml diff --git a/docs/reference/gtk/tmpl/gtktreemodelfilter.sgml b/docs/reference/gtk/tmpl/gtktreemodelfilter.sgml deleted file mode 100644 index cda44ec325..0000000000 --- a/docs/reference/gtk/tmpl/gtktreemodelfilter.sgml +++ /dev/null @@ -1,198 +0,0 @@ - -GtkTreeModelFilter - - -A GtkTreeModel which hides parts of an underlying tree model - - - -A #GtkTreeModelFilter is a tree model which wraps another tree model, -and can do the following things: - - -Filter specific rows, based on data from a "visible column", a column -storing booleans indicating whether the row should be filtered or not, -or based on the return value of a "visible function", which gets a -model, iter and user_data and returns a boolean indicating whether the -row should be filtered or not. - - -Modify the "appearance" of the model, using a modify function. -This is extremely powerful and allows for just changing -some values and also for creating a completely different model based on -the given child model. - - -Set a different root node, also known as a "virtual root". You can pass in -a #GtkTreePath indicating the root node for the filter at construction time. - - - - - - -#GtkTreeModelSort - - - - - - - - - - -The GtkTreeModelFilter struct contains only private fields. - - - - - - - - - - - - - - - -A function which decides whether the row indicated by @iter is visible. - - -@model: the child model of the #GtkTreeModelFilter -@iter: a #GtkTreeIter pointing to the row in @model whose visibility - is determined -@data: user data given to gtk_tree_model_filter_set_visible_func() -@Returns: Whether the row indicated by @iter is visible. - - - - -A function which calculates display values from raw values in the model. -It must fill @value with the display value for the column @column in the -row indicated by @iter. - - -Since this function is called for each data access, it's not a -particularly efficient operation. - - -@model: the #GtkTreeModelFilter -@iter: a #GtkTreeIter pointing to the row whose display values are determined -@value: A #GValue which is already initialized for with the correct type for - the column @column. -@column: the column whose display value is determined -@data: user data given to gtk_tree_model_filter_set_modify_func() - - - - - - - -@child_model: -@root: -@Returns: - - - - - - - -@filter: -@func: -@data: -@destroy: - - - - - - - -@filter: -@n_columns: -@types: -@func: -@data: -@destroy: - - - - - - - -@filter: -@column: - - - - - - - -@filter: -@Returns: - - - - - - - -@filter: -@filter_iter: -@child_iter: -@Returns: - - - - - - - -@filter: -@child_iter: -@filter_iter: - - - - - - - -@filter: -@child_path: -@Returns: - - - - - - - -@filter: -@filter_path: -@Returns: - - - - - - - -@filter: - - - - - - - -@filter: - - diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index 8699462648..d7a155ac9a 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -25,6 +25,37 @@ #include "gtkprivate.h" #include + +/** + * SECTION:gtktreemodelfilter + * @Short_description: A GtkTreeModel which hides parts of an underlying tree model + * @Title: GtkTreeModelFilter + * @See_also:#GtkTreeModelSort + * + * A #GtkTreeModelFilter is a tree model which wraps another tree model, + * and can do the following things: + * + * + * Filter specific rows, based on data from a "visible column", a column + * storing booleans indicating whether the row should be filtered or not, + * or based on the return value of a "visible function", which gets a + * model, iter and user_data and returns a boolean indicating whether the + * row should be filtered or not. + * + * + * Modify the "appearance" of the model, using a modify function. + * This is extremely powerful and allows for just changing + * some values and also for creating a completely different model based on + * the given child model. + * + * + * Set a different root node, also known as a "virtual root". You can pass in + * a #GtkTreePath indicating the root node for the filter at construction time. + * + * + */ + + /* ITER FORMAT: * * iter->stamp = filter->priv->stamp diff --git a/gtk/gtktreemodelfilter.h b/gtk/gtktreemodelfilter.h index 67e34fbb89..1dc097a5d8 100644 --- a/gtk/gtktreemodelfilter.h +++ b/gtk/gtktreemodelfilter.h @@ -37,9 +37,38 @@ G_BEGIN_DECLS #define GTK_IS_TREE_MODEL_FILTER_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), GTK_TYPE_TREE_MODEL_FILTER)) #define GTK_TREE_MODEL_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_MODEL_FILTER, GtkTreeModelFilterClass)) +/** + * GtkTreeModelFilterVisibleFunc: + * @model: the child model of the #GtkTreeModelFilter + * @iter: a #GtkTreeIter pointing to the row in @model whose visibility + * is determined + * @data: user data given to gtk_tree_model_filter_set_visible_func() + * + * A function which decides whether the row indicated by @iter is visible. + * + * Returns: Whether the row indicated by @iter is visible. + */ typedef gboolean (* GtkTreeModelFilterVisibleFunc) (GtkTreeModel *model, GtkTreeIter *iter, gpointer data); + +/** + * GtkTreeModelFilterModifyFunc: + * @model: the #GtkTreeModelFilter + * @iter: a #GtkTreeIter pointing to the row whose display values are determined + * @value: A #GValue which is already initialized for with the correct type for + * the column @column. + * @column: the column whose display value is determined + * @data: user data given to gtk_tree_model_filter_set_modify_func() + * + * A function which calculates display values from raw values in the model. + * It must fill @value with the display value for the column @column in the + * row indicated by @iter. + * + * Since this function is called for each data access, it's not a + * particularly efficient operation. + */ + typedef void (* GtkTreeModelFilterModifyFunc) (GtkTreeModel *model, GtkTreeIter *iter, GValue *value, -- 2.30.2